<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <!-- Bootstrap core CSS -->
    <link href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="starter-template.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="../../assets/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
    <nav class="navbar navbar-inverse">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/accounts/index/">定向网页分析系统</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
              <li><a href="/accounts/index-all/">所有网页</a></li>
              <li><a href="">刷新</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="pull-right"><a href="/accounts/logout/">退出</a></li>
            </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="starter-template">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span2">
                    <!--Sidebar content-->
                    <div class="tabbable tabs-left">
                        <h3>
                            <small>
                                {{topic}}
                            </small>
                        </h3>
                        <ul class="nav nav-tabs">
                            <li>
                                <a href="/accounts/favour/search?keyword={{favour.keywords}}&p=1">{{favour.keywords}}</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="span10">
                    <!--Body content-->
                    {% if webpages %}
                    <div class="panel panel-default left">
                        <ul class="list-group">
                            {% for webpage in webpages %}
                            <div>
                                <div class="panel-body">
                                    <h1 class="panel-title">
                                        <li class="list-group-item">
                                            <a href="/WebPage/show_webpage/{{webpage.id}}/" target="_blank" onclick="markdown(this)">{{webpage.title}}</a>
                                        </li>
                                    </h1>
                                    {{webpage.intro}}...
                                </div>
                            </div>
                            {% endfor %}
                        </ul>
                    </div>
                    <nav>
                        <ul class="pagination">
                            <li><a href="/WebPage/search-topic/?topic_no={{topic_no}}&p={{pre_page}}"><span aria-hidden="true">&laquo;</span><span class="sr-only">Previous</span></a></li>
                            {% for page_num in page_nums %}
                            {% ifequal page_num cur_page %}
                            <li class="active"><a href="/WebPage/search-topic/?topic_no={{topic_no}}&p={{page_num}}">{{ page_num }} </a></li>
                            {% else %}
                            <li><a href="/WebPage/search-topic/?topic_no={{topic_no}}&p={{page_num}}">{{ page_num }} </a></li>
                            {% endifequal %}
                            {% endfor %}
                            <li><a href="/WebPage/search-topic/?topic_no={{topic_no}}&p={{nex_page}}"><span aria-hidden="true">&raquo;</span><span class="sr-only">Next</span></a>
                        </ul>
                    </nav>
                    {% endif %}
                </div>
            </div>
        </div>
    </div><!-- /.container -->
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
  </body>
</html>


